@import "var";

/*按钮hover*/
@mixin btn-hover($color, $amount) {
  &:hover {
    background-color: darken($color: $color, $amount: $amount);
  }
}

/*隐藏文字*/
@mixin hidden-text {
  /*强制文字在一行文本框内*/
  white-space: nowrap;
  /*溢出部分文字隐藏*/
  overflow: hidden;
  /*溢出部分省略号处理*/
  text-overflow: ellipsis;
}

/*top 标题部分*/
@mixin top {

  border-bottom: .1rem solid $light-grey;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;

  .title {
    padding: .8rem 0;
    font-weight: bold;

    .ic {
      font-size: 1.4rem !important;
    }

    font-size: 1.4rem !important;
  }

}

/*活动菜单*/
@mixin menu-active {
  position: relative;
  a {
    color: $menu-active-color;
  }
  &::after {
    position: absolute;
    content: " ";
    bottom: 1.85rem;
    height: 0.2rem;
    background-color: $menu-active-color;
    border-radius: 0.2rem;
    width: 28%;
    margin: auto;
    left: 0;
    right: 0;
  }
}

/*菜单下拉*/
@mixin dropdown {
  &-dropdown {
    position: absolute;
    padding: 0;
    box-shadow: 0 0 0.125rem 0 rgb(0, 0, 0 / .1);
    border-radius: 0 0 0.4rem 0.4rem;
    background-color: $white;
    z-index: 999;
    display: none;
    width: 12rem;
    left: -2rem;
    font-size: 12px;
    top: auto;
    transform: translate(-50%, 50%);

    li {
      &:hover {
        a {
          color: $menu-active-color !important;
          background-color: $light-grey;
          border-radius: 0 0 0.4rem 0.4rem;
        }

        &:after {
          display: none;
        }
      }

      a {
        padding: 2rem 0;
        width: 100%;
        height: 1rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: unset;
        display: flex;
        align-items: center;
        justify-content: center;
        color: $font-color !important;

      }
    }
  }
}


/* 主体部分开始 */
@mixin column-active {
  color: $menu-active-color;
  a {
    color: $menu-active-color;
  }
  /*  &::after {
    content: " ";
    position: absolute;
    left: 1rem;
    width: 10rem;
    padding: 1.5rem 0;
    background-color: rgba($color: $font-color, $alpha: 0.1);
    border-radius: 10rem;
    z-index: 100;
  } */
}
